package com.infore.dataReceiving.entity;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 实时数据实体类
 */
@Entity
@Table(name="HOUR_DATA")
public class HourData implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="HOUR_ID")
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid") // UUID生成策略
	private String id;
	
	/** 站点mn **/
	@Column(name="mn", length = 20)
	private String mn;
	
	/** 因子编码 **/
	@Column(name="factorCode", length = 20)
	private String factorCode;
	
	/** 数据时间 **/
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@Column(name="dataTime", length = 20)
	private Date dataTime;
	
	/** 浓度平均值 **/
	@Column(name="avg_value", length = 20)
	private String value;
	
	/** 数据状态标识 **/
	@Column(name="flag", length = 10)
	private String flag;
	
	/** 统计标识 **/
    @Column(name="STATISTICS_FLAG")
    private String statisticsFlag = "0";

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMn() {
		return mn;
	}

	public void setMn(String mn) {
		this.mn = mn;
	}

	public String getFactorCode() {
		return factorCode;
	}

	public void setFactorCode(String factorCode) {
		this.factorCode = factorCode;
	}

	public Date getDataTime() {
		return dataTime;
	}

	public void setDataTime(Date dataTime) {
		this.dataTime = dataTime;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

    public String getStatisticsFlag() {
        return statisticsFlag;
    }

    public void setStatisticsFlag(String statisticsFlag) {
        this.statisticsFlag = statisticsFlag;
    }

	


}
